<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<span th:text="${name}"></span>
<input type="text" name="name" th:value="${name}">
<input type="text" name="date" th:value="${#dates.format(date,'yyyy-MM-dd')}">
<input type="text" name="msg" th:value="${#strings.substring(msg,0,5)}">
<input type="text" name="msg" th:value="${#strings.substring(msg,7)}">
</body>
</html>